1. Field of the Invention
The present invention relates to a semiconductor device and a driving method thereof.
Note that in this specification, a semiconductor device refers to a device that includes a circuit including a semiconductor element (e.g., a transistor, a diode, a resistor, or a capacitor). Alternatively, a semiconductor device refers to any device that can function by utilizing semiconductor characteristics. For example, an integrated circuit, a chip including an integrated circuit, a display device, a light-emitting device, an electronic device, and the like are included in a semiconductor device or include a semiconductor device in some cases.
2. Description of the Related Art
A differential circuit is used for an operational amplifier, a comparator, or the like.
A comparator is one of the main circuits of an analog-digital converter (hereinafter, it may be referred to as an ADC). Variations in the electric characteristics of transistors included in a comparator generate an offset voltage at a differential circuit included in the comparator. In the case where such an offset voltage is generated, even when the same voltage is applied to two input terminals of the comparator, the comparator determines the offset voltage as a potential difference between the two input terminals; thus, the comparator outputs a signal with an unexpected output level. Thus, it is necessary to correct the offset voltage of the differential circuit to accurately perform A/D conversion.
For example, in Patent Document 1, an ADC is provided with a means for measuring the offset voltage of a comparator. Reference voltages for comparators are set based on offset voltages measured by the measurement means. Further, in Patent Document 1, data for setting these reference voltages is written to a memory circuit, and an operation of correcting an offset voltage is not performed in using the ADC.    [Patent Document 1] Japanese Published Patent Application No. 2002-319863